package com.wanmait.recruit.service.impl;

import com.github.pagehelper.PageInfo;
import com.wanmait.recruit.mapper.CompanyAdminMapper;
import com.wanmait.recruit.pojo.CompanyAdmin;
import com.wanmait.recruit.pojo.Person;
import com.wanmait.recruit.service.CompanyAdminService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service("companyAdminService")
@Transactional(rollbackFor = Exception.class)
public class CompanyAdminServiceImpl implements CompanyAdminService {

    @Resource
    CompanyAdminMapper companyAdminMapper;

    @Override
    public void insert(CompanyAdmin object) {
        companyAdminMapper.insertSelective(object);
    }



    @Override
    public void delete(CompanyAdmin object) {

    }

    @Override
    public void update(CompanyAdmin object) {

    }

    @Override
    public PageInfo<CompanyAdmin> search(int pageNum, int pageSize) {
        return null;
    }

    @Override
    public CompanyAdmin findByPerson(Person person) {
        return companyAdminMapper.findByPersonId(person.getId());
    }
}
